//
//  KKDraftCell.m
//  DoMi
//
//  Created by 康凯 on 2016/11/17.
//  Copyright © 2016年 kk. All rights reserved.
//

#import "KKDraftCell.h"

@implementation KKDraftCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)initMsgData:(KKMessageM *)msg{
    self.title.text=msg.title;
    self.content.text=msg.context;
    self.time.text=msg.msgtime;
}
-(void)initDraftData:(KKCollectDocumentM *)msg{
    self.title.text=msg.title;
    self.content.text=@"";
    self.time.text=msg.systime;
}

-(void)initConsultData:(KKMyConsultM *)consult{
    self.title.text=consult.expertname;
    self.content.text=consult.question;
    self.time.text=consult.systime;
    if([consult.status isEqualToString:@"未查看"]){
        [self.statusImg setImage:[UIImage imageNamed:@"noread"]];
    }else if([consult.status isEqualToString:@"已查看"]){
        [self.statusImg setImage:[UIImage imageNamed:@"read"]];
    }else if([consult.status isEqualToString:@"新回复"]){
        [self.statusImg setImage:[UIImage imageNamed:@"newrep"]];
    }else if([consult.status isEqualToString:@"未回复"]){
        [self.statusImg setImage:[UIImage imageNamed:@"waitrep"]];
    }
}
-(void)initConsultExpertData:(KKMyConsultM *)consult{
    self.title.text=consult.expertname;
    self.content.text=consult.question;
    self.time.text=consult.systime;
    
    if([consult.status isEqualToString:@"未回答"]){
        [self.statusImg setImage:[UIImage imageNamed:@"norepeat"]];
    }else if([consult.status isEqualToString:@"未支付"]){
        [self.statusImg setImage:[UIImage imageNamed:@"nopay"]];
    }else if([consult.status isEqualToString:@"已支付"]){
        [self.statusImg setImage:[UIImage imageNamed:@"pay"]];
    }
}
-(void)initQuestionData:(KKMyXuanShangM *)question{
    self.title.text=question.title;
    self.time.text=question.startdate;
    self.content.text=@"";
}
@end
